// import com.alibaba.druid.sql.ast.SQLDataTypeImpl;
// import com.alibaba.druid.sql.ast.SQLParameter;
// import com.alibaba.druid.sql.ast.SQLStatement;

// import java.util.ArrayList;
// import java.util.List;
#include "OracleProcedureDataType.h"
#include "../../../ast/SQLParameter.h"
#include "../../../ast/SQLStatement.h"

OracleProcedureDataType::OracleProcedureDataType()
{
  parameters = std::make_shared<std::list<SQLParameter_ptr>>();
}
BOOL_ptr OracleProcedureDataType::isStatic()
{
  return isStatic_;
}

void OracleProcedureDataType::setStatic(BOOL_ptr aStatic)
{
  isStatic_ = aStatic;
}

SQLParameter_list_ptr OracleProcedureDataType::getParameters()
{
  return parameters;
}

SQLObject_ptr OracleProcedureDataType::clone()
{
  SQLObject_ptr clone_tmp = std::shared_ptr<OracleProcedureDataType>(new OracleProcedureDataType());
  std::shared_ptr<OracleProcedureDataType> x = std::dynamic_pointer_cast<OracleProcedureDataType>(clone_tmp);
  // OracleProcedureDataType x = new OracleProcedureDataType();
  cloneTo(x);

  x->isStatic_ = isStatic_;
  for (SQLParameter_ptr parameter : *parameters)
  {
    SQLParameter_ptr p2 = std::dynamic_pointer_cast<SQLParameter>(parameter->clone());
    p2->setParent(x);
    x->parameters->push_back(p2);
  }

  return x;
}

SQLStatement_ptr OracleProcedureDataType::getBlock()
{
  return block;
}

void OracleProcedureDataType::setBlock(SQLStatement_ptr block)
{
  if (block != nullptr)
  {
    block->setParent(SharedObject(OracleProcedureDataType));
  }
  this->block = block;
}
